<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>出差申请单</title>
    <link rel="stylesheet" href="../../../css/aui.css" />
    <link rel="stylesheet" href="../../../css/my/apply.css" />
    <script src="../../../script/widget/include.js"></script>
    <link rel="stylesheet" href="../../../css/trip/apply/date.css">
    <link rel="stylesheet" href="../../../css/iconfont/iconfont.css" />
    <link rel="stylesheet" href="../../../script/widget/Zepto/dropload.css" />
    <style>
        .dropload-down {
            height: 0;
        }
    </style>
</head>

<body style="cursor: pointer">
    <div class="aui-tab" id="a">
        <div class="aui-tab-item aui-active">我的</div>
        <div class="aui-tab-item">待我审批的</div>
    </div>
    <div id="tab" style="overflow: scroll;">

    </div>
</body>
<script type="text/javascript" src="../../../script/aui/api.js"></script>
<script type="text/javascript" src="../../../script/extend/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../../script/extend/doT.min.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/config.js"></script>
<script type="text/javascript" src="../../../script/extend/picker.min.js"></script>
<script type="text/javascript" src="../../../script/widget/Zepto/dropload.min.js"></script>
<script type="text/javascript" src="../../../service/index/order.js"></script>

<!--列表模板 start-->
<script id="list_tpl" type="text/x-dot-template">
    {{ for(var prop in it) { }}
    <div class="apply_style" style="margin-top: 10px;">
        <div class="icon_order travel_info"  data-id="{{=it[prop]['id']}}">
            <i class="iconfont icon-feiji2" style="font-size: 1.5rem;color: #3CB0D6;float: left;"></i>
            <span class="color-blue">申请单号：{{= it[prop]['travel_application_number'] }}</span> {{ if(it[prop]['status'] == '未审批'){ }}
            <span class="await">{{= it[prop]['status'] }}</span> {{ }else if(it[prop]['status'] == '已通过'){ }}
            <span class="pass">{{= it[prop]['status'] }}</span> {{ }else if(it[prop]['status'] == '已驳回'){ }}
            <span class="await">{{= it[prop]['status'] }}</span> {{ }else if(it[prop]['status'] == '审批中'){ }}
            <span class="await">{{= it[prop]['status'] }}</span> {{ }else if(it[prop]['status'] == '已取消'){ }}
            <span class="await" style="color: gray;">{{= it[prop]['status'] }}</span> {{ }else if(it[prop]['status'] == '已作废'){ }}
            <span class="await" style="color: gray;">{{= it[prop]['status'] }}</span> {{ } }}
        </div>
        <p class="font_color">出行开始时间：{{= it[prop]['travel_time'] }}</p>
        <p class="font_color">出行结束时间：{{= it[prop]['travel_end_time'] }}</p>
        <p class="font_color">出行人：{{= it[prop]['business_name'] }}</p>
        <p class="font_color">审批人：{{= it[prop]['approve_name'] }}</p>
        <p class="font_color">申请人：{{= it[prop]['book_user_name'] }}</p>
        {{ if(it[prop]['status'] == '未审批' && it[prop]['is_mine'] == 1){ }}
        <div class="font_color" style="text-align: right;">
            <div class="aui-btn aui-btn-info cancel" data-id="{{=it[prop]['id']}}">取消</div>
        </div>
        {{ } }} {{ if(it[prop]['is_turn'] == 0 && it[prop]['status'] != '已通过' && it[prop]['status'] != '已驳回' && it[prop]['status'] != '已取消'){ }} {{ } }} {{ if(it[prop]['status'] == '已通过' && it[prop]['is_mine'] == 1 && it[prop]['expense_id'] == 0 && it[prop]['allowance_id']
        == 0){ }}
        <div class="font_color" style="text-align: right;">
            <div class="aui-btn aui-btn-info invalid" data-id="{{=it[prop]['id']}}">作废</div>
        </div>
        {{ } }}
    </div>
    {{ } }}
</script>
<!--列表模板 end-->
<script type="text/javascript">
    apiready = function() {

        new order({
            orderName           : '申请单'                            //xx单名称
            ,mineListInterface  : Config.travel.applyListMine         //我的申请单接口
            ,otherListInterface : Config.travel.applyListApprove      //待我审批的申请单接口
            ,cancelInterface    : Config.travel.applyCancel           //取消接口
            ,invalidInterface   : Config.travel.applyInvalid          //作废接口
            ,winName            : 'travel_apply_info_win'             //打开新窗口的名称
            ,storageId          : 'apply_id'                          //存储storageId的名称
        });
    }
</script>

</html>
